package com.lanchetech.service;

import com.lanchetech.bean.vo.OrderSkuVO;
import com.lanchetech.common.enums.IdentityTypeEnum;
import com.lanchetech.entity.Spu;
import com.lanchetech.entity.User;
import com.lanchetech.entity.UserCommission;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.List;
import java.util.Map;

public interface CommissionService {

    List<UserCommission> issueMemberDividends(List<UserCommission> commissions, Long userId, BigDecimal amount, Calendar calendar, Long orderSkuId, String remark, Map<String, String> config);

    List<UserCommission> issuePartnerDividends(List<UserCommission> commissions, Long userId, BigDecimal amount, Calendar calendar, Long orderSkuId, String remark, Map<String, String> config);

    List<UserCommission> issueShareholderDividends(List<UserCommission> commissions, Long userId, BigDecimal amount, Calendar calendar, Long orderSkuId, String remark, Map<String, String> config);

    void prepareIdentityCommission(User user, IdentityTypeEnum identityType);

    void issueUserCommission(UserCommission userCommission);

    void createVipRewardQueue(User user, Spu spu, BigDecimal amount);

    void createRewardQueue(OrderSkuVO orderSkuVO, Spu spu);

    Long getSuperiorShareholder(Long subordinateId);

    List<UserCommission> prepareCourierCommission(Long ordersId, List<OrderSkuVO> orderSkuVOList, Map<Long, Spu> spuMap);

    void prepareHipoCommission(List<OrderSkuVO> orderSkuVOList);

    void deductAddPerformance(List<OrderSkuVO> orderSkuList);

    void deductAddPerformance(Spu spu,BigDecimal refundAmount);

    void editDividendPrecipitation(Byte type, BigDecimal amount,Integer count,Map<String, String> config);

    void rewardDividendPrecipitation();

    void rewardMarketSubsidy();

    void rewardDirectorCommission();

    void rewardShareholderPrecipitation();

    void rewardWelfare();
}